<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html>
<head>
<%
	String path = request.getContextPath();
	// 获得本项目的地址(例如: http://localhost:8080/MyApp/)赋值给basePath变量 
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	// 将 "项目路径basePath" 放入pageContext中，待以后用EL表达式读出。 
	pageContext.setAttribute("basePath", basePath);
	//out.write(basePath);
%>
    <title></title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="<%=basePath%>logined/Add/Css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="<%=basePath%>logined/Add/Css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="<%=basePath%>logined/Add/Css/style.css" />
    <script type="text/javascript" src="<%=basePath%>logined/Add/Js/jquery.js"></script>
    <script type="text/javascript" src="<%=basePath%>logined/Add/Js/bootstrap.js"></script>
    <script type="text/javascript" src="<%=basePath%>logined/Add/Js/ckform.js"></script>
    <script type="text/javascript" src="<%=basePath%>logined/Add/Js/common.js"></script>


<script>
    $(function () {       
		$('#backid').click(function(){
				window.location.href="<%=basePath %>logined/teaindex.jsp";
		 });

    });
    </script>
    <script>
    function get_t(obj){
    	if(obj.innerText=="选课"){
    	obj.innerText="已选"
    	}else{
    	obj.innerText="选课"
    	}
    	}
    </script>
 

    <style type="text/css">
    a:link {
    color: #F20A0F
    }		
    a:visited {
    color: #B9BCC1
    }	
    
    
    
    
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


    </style>
</head>
<body>
<form action="<%=basePath%>StuInfoModifyServlet" method="post"  class="form-inline definewidth m20">    
  

 <div>
<table class="table table-bordered table-hover definewidth m10">
    <thead>
    <tr>
        <th>序号</th>
        <th>课程编号</th>
        <th>课程名称</th>
        <th>操作</th>
        
       
    </tr>
    </thead>
   <tbody>
    
      
      <c:forEach items="${sessionScope.lstCou }" var="eachCou" varStatus="st">
	     <tr>

	     
            <td>${st.index+1 }</td>
            <td>${eachCou.cou_id }</td>
            <td>${eachCou.cou_name }</td>
           
            
            <td>
                <a href="<%=basePath%>StuInfoModifyServlet?uid=${eachCou.cou_id }&selectcou=${loginedUserB.username}&uname=${eachCou.cou_name }&opt=0"  onclick="return confirm('你确定选择${eachCou.cou_name }这门课程吗？')">选课</a>   
            </td>
	     
            
        </tr>
      </c:forEach>
   </tbody>	
</table>
</div> 
</form>
</body>
</html>
